/*
 * conf.h
 *
 * Copyright (C) 2011 - Dr.NP
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @version bsp_conf.h 1.0.0
 * @package libbspcore
 * @author Dr.NP <np@bsgroup.org>
 * @update 03/18/2011
 */

#ifndef BSP_CONF_H

#define BSP_CONF_H                              1

// Definations
#define CONF_HASH_SIZE                          1024
#define CONF_INDEX_INITIAL                      4096
#define MAX_CONF_LINE_LENGTH                    32767

#define CONF_LEVEL_INIT                         10
#define CONF_LEVEL_FILE                         80
#define CONF_LEVEL_OVERWRITE                    90

// Macros

// Structs
struct param_t
{
    char *key;
    char *value;
    int level;
    struct param_t *next;
};

// Functions
int conf_init();
int conf_load(const char *);
void conf_set(char *, char *, int);
char *conf_get(char *);
struct param_t ** conf_traversal(int *);

#endif  /* bsp_conf.h */
